﻿using System;
using System.Collections.Generic;
using System.Text;
using NetworkLib.Utilities;

namespace PokemonBattle.BattleRoom.Client
{
    public class ObserveInfo : DataByteArray
    {
        public string BattleAddress { get; set; }
        public int BattleIdentity { get; set; }
        public byte Position { get; set; }

        #region abstract

        public override void Read(ByteArray byteArray)
        {
            this.BattleAddress = byteArray.ReadUTF();
            this.BattleIdentity = byteArray.ReadInt();
            this.Position = byteArray.ReadByte();
        }

        public override void Write(ByteArray byteArray)
        {
            byteArray.WriteUTF(this.BattleAddress);
            byteArray.WriteInt(this.BattleIdentity);
            byteArray.WriteByte(this.Position);
        }

        #endregion

    }
}